<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<!--author: AGolubinskyy -->
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:f="http://java.sun.com/jsf/core" 
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui">
    <h:head>
        <title>Request adder</title>
    </h:head>
    <h:body>
        <ui:component>
            <h:form>
                <h:panelGrid columns="1" columnClasses="submitColumn">
                    <h:outputText value="Select product you need:"/> 
                    <h:selectOneMenu value="#{rad.product}">
                        <f:selectItems value="#{rad.products}"/>
                    </h:selectOneMenu>
                    <h:outputText value="Provide some additional information:"/>
                    <p:inputTextarea value="#{rad.message}" required="true" id="description"
                                     requiredMessage="Please provide some description."/>
                    <p:message for="description"/>
                    <h:commandButton value="Submit request" action="#{rad.submitRequest}">
                        <f:ajax execute="@form" render="@form"/>
                    </h:commandButton>
                    <p:messages globalOnly="true"/>
                </h:panelGrid>
            </h:form>
        </ui:component>
    </h:body>
</html>
